Skip to content

Issue 53446: misconfigured plate assay design, plate validation query optimization #6839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2025

Conversation

labkey-nicka
Copy link
Contributor

@labkey-nicka labkey-nicka commented Jul 11, 2025

Rationale

This addresses Issue 53446 by skipping assay designs that do not have the columns required to determine their run count in relation to plates. Additionally, this optimizes the query for validating unique samples in a primary plate set by making use of a CTE to define the set of plate sets to filter on.

Changes

  • Skip attempting to count runs against plate-based assay designs which are improperly configured
  • Query optimization for validating unique samples in a primary plate set

Tasks

@labkey-chrisj
Copy link
Contributor

labkey-chrisj commented Jul 14, 2025

Manual Testing notes:
This FB addresses the issue described in Issue 53446-
The only way I could misconfigure an assay in this way is by:

  1. disabling plate metadata, save
  2. edit plate column from lookup->plate to lookup->sample type, save
  3. re-enable plate metadata, save

At this point, the assays list in a plate set renders without error
Going to the assay upload page renders no errors
As we might expect, entering data into the grid here resolves samples in the sampletype the Plates field looks to
Also predictably, attempting to save data referencing a sample and not a plate by rowId causes an error (the gist of which is: there's no matching plate in the plate set specified here). Theoretically if the sample rowID happened to be within the range of plate rowIDs we would miss this error and the user's data integrity would be toast.
On the one hand, this is very much an edge case that could be reduced to 'we let users configure the product in ways that don't work'.
On the other, protecting our users from making bad choices with built-in fields might require us to think long and deliberately about how far we're willing to limit user choices in the name of stability.

@labkey-nicka labkey-nicka merged commit c7863ed into develop Jul 14, 2025
17 checks passed
@labkey-nicka labkey-nicka deleted the fb_plate_queries branch July 14, 2025 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants